.tag {
  border-radius: $space-x1;
  display: flex;
  align-items: center;
  padding: $space-x1;
  font-weight: normal;
  font-size: 12px;
  line-height: 16px;

  @each $name, $color in $theme-colors {
    &.#{$name} {
      background-color: $color;
      color: $white;
    }

    .button-icon {
      &:hover,
      &:focus,
      &:active {
        outline: none;

        > svg {
          path {
            fill: darken($white, 15%) !important;
          }
        }
      }
    }
  }

  &.gray-300 {
    background-color: $gray-300;
    color: $gray-800;

    .button-icon {
      &:hover,
      &:focus,
      &:active {
        outline: none;

        > svg {
          path {
            fill: darken($gray-600, 15%) !important;
          }
        }
      }
    }
  }

  &.warning {
    color: $gray-800;

    .button-icon {
      &:hover,
      &:focus,
      &:active {
        outline: none;

        > svg {
          path {
            fill: darken($gray-600, 15%) !important;
          }
        }
      }
    }
  }

  &.refresh {
    color: $gray-800;

    .button-icon {
      &:hover,
      &:focus,
      &:active {
        outline: none;

        > svg {
          path {
            fill: darken($gray-600, 15%) !important;
          }
        }
      }
    }
  }

  &.xs {
    padding: 0 $i-space-x1;
  }

  &.m {
    font-size: 14px;
    line-height: 20px;
  }

  &.l {
    font-size: 14px;
    line-height: 24px;
    padding: $space-x1 $space-x2;
  }

  &.is-click-tag {
    cursor: pointer;
  }
}
